package org.jim.core.packets;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class GroupMember implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String groupId; //群ID
    private String userId; //用户ID
    private String nickname;   //用户昵称
    private String avatar; //用户头像
    private int role;      //用户角色 0普通用户 1管理员 2群主
    private int mute;      //群用户禁言 0 正常 1 禁言
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date joinTime;//进群时间
    private String extras;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public int getMute() {
        return mute;
    }

    public void setMute(int mute) {
        this.mute = mute;
    }

    public Date getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    public String getExtras() {
        return extras;
    }

    public void setExtras(String extras) {
        this.extras = extras;
    }

    public GroupMember() {
    }

    public GroupMember(String groupId, String userId, String nickname, String avatar, int role, int mute, Date joinTime) {
        this.groupId = groupId;
        this.userId = userId;
        this.nickname = nickname;
        this.avatar = avatar;
        this.role = role;
        this.mute = mute;
        this.joinTime = joinTime;

    }
}
